<?php
/**
 * Controller is the customized base controller class.
 * All controller classes for this application should extend from this base class.
 */
class Controller extends RController
{

    private $_menu = array();

    public function filters() {
        return array( 'rights', );
    }

    public function getMenu(){
        return $this->_menu;
    }

    protected function addMenu($menuItem){

        if(is_array($menuItem[0])){
            foreach ($menuItem as $item){
                $this->addMenu($item);
            }
        }else
            $this->_menu[] = $menuItem;

    }

    protected function accessDeniedIf($condition, $message = null){
        if($condition) $this->accessDenied($message);
    }


 }